package com.ck567.automationtesting.controller

import com.ck567.automationtesting.entity.Book
import com.ck567.automationtesting.service.Service
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import javax.annotation.Resource


@RestController
@RequestMapping("/api/v1")
class Controller {
    @Resource
    lateinit var service: Service
    @GetMapping("/books")
    fun getBook(title: String?): Book? {
        return service.queryByTitle(title)
    }
}